package com.soup.lab.validation;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotNull;

@RestController
@RequestMapping("/validate")
@Validated
public class ValidateController {

    @GetMapping("simple")
    public Object simple(@NotNull String name) {
        return name;
    }

}
